FROM keymetrics/pm2
RUN mkdir -p /snjob-web
WORKDIR /snjob-web
COPY . /snjob-web/
RUN mv ./production.env ./.env
RUN yarn config set registry 'https://registry.npm.taobao.org'
RUN yarn install
RUN yarn build
RUN echo "2018.3.18.3" > /snjob-web/.next/BUILD_ID
EXPOSE 5000
CMD [ "pm2-docker", "start", "pm2.json" ]
